package org.yuanqiframework.yuanqi.boot.sys.utils;


import org.yuanqiframework.yuanqi.web.exception.BusinessException;

public class BusinessExceptionUtils {
    public static void throwBusinessException() {
        throw new BusinessException();
    }

    public static void throwBusinessException(Boolean condition, String message) {
        if (condition)
            throw new BusinessException(message);
    }

    public static void throwBusinessException(Boolean condition, String message, Integer errorCode) {
        if (condition)
            throw new BusinessException(message, errorCode);
    }

    public static void throwBusinessException(String message) {
        throw new BusinessException(message);
    }


    public static void throwBusinessException(String message, Integer errorCode) {
        throw new BusinessException(message, errorCode);
    }
}
